package com.xhwl.centiotdata.integration.vehicleschedule;

import com.xhwl.centiotdata.integrator.vehicleschedule.sinoiov.TruckQueryResponseDTO;
import com.xhwl.centiotdata.integrator.vehicleschedule.station.StationDTO;
import com.xhwl.common.dto.cent.iotdata.vehicleschedule.*;
import com.xhwl.common.exception.BusinessException;
import com.xhwl.common.pojo.ResultJson;

import java.util.List;

/**
 * Falcon.cao @Copyright (C), 2022, 兴海物联
 * Date: 2022/10/4 14:00
 * Description: 车辆调度处理接口
 */
public interface VehicleScheduleSystemHandler {

    /**
     * 检查车辆是否允许进入
     *
     * @param config  配置实体
     * @param request 请求实体
     */
    default VehicleScheduleResponseDTO onCheckingTruckEntry(VehicleScheduleIntegrationConfig config, VehicleScheduleRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     * 同步车辆事件
     *
     * @param config  配置实体
     * @param request 请求实体
     */
    default VehicleScheduleResponseDTO onSyncingTruckEvents(VehicleScheduleIntegrationConfig config, VehicleScheduleRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    default VehicleScheduleResponseDTO onSyncingWeighResult(VehicleScheduleIntegrationConfig config, VehicleScheduleRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     * 通知车辆调度地磁变更的状态消息
     */
    default VehicleScheduleResponseDTO onSyncingSpaceStatus(VehicleScheduleIntegrationConfig config, VehicleScheduleRequestsDTO request){
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     * 获取车辆队列
     *
     * @param config 配置实体
     */
    default List<VehicleScheduleResponseDTO> onListingQueue(VehicleScheduleIntegrationConfig config, VehicleScheduleRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     * 查询点位车辆队列
     */
    default List<VehicleScheduleStatisticsResponseDTO> onQueryPositionTruckQueues(VehicleScheduleIntegrationConfig config, VehicleScheduleStatisticsRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     * 查询点位实时工作车辆（垛口）
     */
    default List<VehicleScheduleStatisticsResponseDTO> onQueryPositionTruckDetail(VehicleScheduleIntegrationConfig config, VehicleScheduleStatisticsRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     * 查询点位实时工作车辆
     */
    default List<VehicleScheduleStatisticsResponseDTO> onQueryPositionTruckCounts(VehicleScheduleIntegrationConfig config, VehicleScheduleStatisticsRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     * 查询点位实时工作车辆
     */
    default List<VehicleScheduleStatisticsResponseDTO> onQueryPositionTruck(VehicleScheduleIntegrationConfig config, VehicleScheduleStatisticsRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     * 查询车辆任务统计
     */
    default List<VehicleScheduleStatisticsResponseV2DTO> onQueryOrderStatistics(VehicleScheduleIntegrationConfig config, VehicleScheduleStatisticsRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     * 查询车辆运单统计
     */
    default List<VehicleScheduleOrderFlowStateResponseDTO> onQueryFlowsStatistics(VehicleScheduleIntegrationConfig config, VehicleScheduleStatisticsRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     * 按时间查询环节车辆
     */
    default List<VehicleScheduleResponseV2DTO> onQueryOrderFlowState(VehicleScheduleIntegrationConfig config, VehicleScheduleStatisticsRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     * 查询奶车待采样队列
     */
    default List<VehicleScheduleWaitTestCallTruckDTO> onQueryWaitTestCallTruckList(VehicleScheduleIntegrationConfig config, VehicleScheduleStatisticsRequestsDTO request) throws Exception {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     * 称重队列查询
     */
    default List<VehicleSchedulePoundQueueInfoDTO> onQueryPoundQueueInfo(VehicleScheduleIntegrationConfig config, VehicleScheduleStatisticsRequestsDTO request) throws Exception {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     *垛口信息查询
     */
    default List<StationDTO> stationQuery(VehicleScheduleIntegrationConfig config, VehicleScheduleStatisticsRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     *排队车辆信息查询
     */
    default List<TruckQueryResponseDTO> truckQuery(VehicleScheduleIntegrationConfig config, VehicleScheduleStatisticsRequestsDTO request) {
        throw new BusinessException("该供应商未实现此功能");
    }

    /**
     *客户信息查询
     */
    default List<String> customerQuery(VehicleScheduleIntegrationConfig config, Integer projectId, String requestTime, String transportOrderCode) {
        throw new BusinessException("该供应商未实现此功能");
    }
}
